<? 
	$title="User List"; 
	$pageid="4";
	$accessid=",a10,";
	require("required/dbconnect.php"); 
	require("required/function.php");
	require("required/header.php");
	checkAccess("allow_user_management",1);
 
	
	$get_branch=mysql_query("select * from os_branch order by create_datetime desc")or die(mysql_error());
	
	
?>
<table width="100%"  cellpadding="0" cellspacing="5" height="300">
<tr>

	<td valign="top">
		<font class="title">Branch Management</title><br><br>
			<table width="100%" class="solidborder">
				<tr class="table_header">
					<td width="3%">No</td><td width="35%">Branch Name</td><td width="7%">Publish</td><td width="11%">Action</td>
				</tr>
				<? if(mysql_num_rows($get_branch)==0){ ?>
				<tr valign="top">
					<td align="center" colspan="7">
					- No record found - 
					</td>
				
				<? 
					}
					else
					{
						$no=1;
						while($a=mysql_fetch_array($get_branch,MYSQL_ASSOC))
						{
							$enid=en_id($a['id']);
							 if($no%2==0)
                                    {
                                        $class1="table_item_even";
                                        $class2="table_item_odd";
                                    }
                                    else
                                    {
                                        $class1="table_item_odd";
                                        $class2="table_item_even";
                                    }
							
							if($a['status']==0)
							{
								$status="No";
							}
							else
							{
								$status="Yes";	
							}
							
							
				?>
			    <tr height="20" valign="top" class="<?= $class1 ?>" onmouseover="this.className='table_item_mouseover'" 
                            onmouseout="this.className='<?= $class1 ?>'">
						<td align="center"><?= $no ?></td>
						<td><?= $a['branch_name'] ?></td>
						
						<td><?= $status ?></td>
						<td align="center"><a href="branch_edit.php?id=<?= $enid ?>"><img src="images/icons/edit.gif" border="0"></a>
                        <a href="branch_delete.php?id=<?= $enid ?>"> <img src="images/icons/delete.gif" border="0"></a></td>								
			  </tr>
				<? 
					$no++; 
						}
					}
				?>
				
			</table>
			
		<table>
			
			<tr>
				<td colspan="3"><input type="button" value="Add Branch" class="button" onClick="window.open('branch_add.php','_self')"></td>
			</tr>
		</table>
		
		
		</td>
	</tr>
	
	
</table>
<? require("required/footer.php"); ?>

